package com.ssh.entity;

import java.sql.Timestamp;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

@Entity
public class Employee extends BaseEntity{
	private static final long serialVersionUID = -6350749898211046703L;
	private String userName;
	private String password;
	private Timestamp createDate;
	private Integer del;
	private Employee employee;
	private Position position;
	
	public Employee() {
	}

	@ManyToOne(cascade ={CascadeType.ALL},fetch = FetchType.LAZY)              
    @JoinColumn(name="parentId")
	public Employee getEmployee() {
		return employee;
	}

	public void setEmployee(Employee employee) {
		this.employee = employee;
	}

	@ManyToOne(cascade ={CascadeType.ALL},fetch = FetchType.LAZY)    
    @JoinColumn(name="positionId")
	public Position getPosition() {
		return position;
	}

	public void setPosition(Position position) {
		this.position = position;
	}

	public String getUserName() {
		return this.userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public Timestamp getCreateDate() {
		return this.createDate;
	}

	public void setCreateDate(Timestamp createDate) {
		this.createDate = createDate;
	}

	public Integer getDel() {
		return this.del;
	}

	public void setDel(Integer del) {
		this.del = del;
	}
}